<?php 
class IntroModel extends Model
{
	//设置表名
	protected $trueTableName = 'cmp_intro';
	
	//设置主键
	protected  $key = 'cmp_id';
	
		
		/**
		 * 通过ID 获取一条数据
		 * @param unknown $id 主键ID
		 * @return Ambigous <mixed, boolean, NULL, multitype:, unknown, string>
		 */
		public function getRowById($id)
		{
				
			//字段
			$field = array(
		
					'*',
		
			);
		
			//条件
			$where = $this->key."=".$id;
				
			return $this->field($field)->where($where)->find();
				
		}
}

?>